#pragma once

#include "StructService.h"

class CFilyServices :
	public CNTService
{
public:
	CFilyServices(const TCHAR * name,const TCHAR * show,const TCHAR * detail);
	//~CFilyServices(void);
public:
	virtual void WINAPI ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
	virtual void OnStop();
	virtual void OnPause();
	virtual void OnContinue();
	virtual void ShowHelp();
	virtual void OnUserDefinedRequest(DWORD dwControl);
	//virtual void _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);
	
	//CTranSvrData m_transvrdata;
	//CTranVisualData m_tranvisualdata;
	//CWeightSvr m_WeightSvr;

protected:
	std::string m_LogAddress;
	int m_LogPort;
	int     m_LogSocketType;
	volatile long m_lWantStop;
	volatile long m_lPaused;
	DWORD         m_dwBeepInternal;
	std::list<ServiceStruct *> m_LoadServices;
	std::list<ServiceStruct *>::iterator it;
	virtual void SysLogRecord(const std::string& data );
	virtual void SysLogRecord(const std::wstring& data );
	virtual void SysLogRecord(const std::wstring& data,int length);
public:
	// StartDllService
	void LoadDllServices(const std::wstring & filename,const std::string & start,
		const std::string & stop,const std::string & pause,const std::string & contin);
	void StartDllServices();
	// PauseDllServices
	void PauseDllServices(void);
	// ContinueDllServices
	void ContinueDllServices(void);
	// StopDllServices
	void StopDllServices();
};

